<div class="page">
<?php echo $html->getTitle('cMetaTitle')?>  

<?php
if($html->countUrl==1)
{
    $img    =  $html->getIntroImage();
?> 
    <div class="Content">
        <?php 
        if($img)
        {
        ?>
            <img src="<?php echo $img?>" width="260" style="float: right;" alt="Map" />
        <?php
        }
        ?>
        <div>
            <?php echo $html->getContent('cDescription')?>
            <?php echo buildreadmore($html->getContent('cIntro'))?>
        </div>
        
        <div class="clear">&nbsp;</div>
        <div>
            <a class="map" href="/<?php echo $html->urlRoot?>/map"><?php echo __("View all Regions on a map")?></a>
        </div>
        <div class="clear">&nbsp;</div>
        <?php echo $locationhtml?>
    </div>  
<?php
}
else if($html->getContent("type")=="map")
{
?>
    <div class="Content">
    <div style="padding-bottom: 7px;"><a class="map" href="/<?php echo $html->urlRoot?>"><?php echo __("Turn off map view")?></a></div>
    <div id="map_canvas" style="width: 860px; height: 450px;"></div>
    </div> 
<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;sensor=true&amp;key=ABQIAAAApeRTeh9ZmVWbqpkXaQM0eBRCYusxjdKxBG12ya75flJaT5dFbBQ_fj-DWgRYskjM4q1uUmv6YgP2xg" type="text/javascript"></script>
<script type="text/javascript">

function initialize_map() {
  if (GBrowserIsCompatible()) {
    var map = new GMap2(document.getElementById("map_canvas"));
    map.setCenter(new GLatLng(14.774882506516272, 104.5458984375), 5);
    //map.openInfoWindow(map.getCenter(),document.createTextNode("<?echo $map['cName']?>"));
    map.setUIToDefault();
  }
}
window.onload= initialize_map;
</script>
         
<?php
}
else
{
?>    
    <div class="col1" >
       <div id="PhotoShow" style="height:410px;width:630px;"></div>
       
       <div class="Intro">
            <div class="Msg">
                <?php echo $html->getContent('cDescription')?>
                <?php echo buildreadmore($html->getContent('cIntro'))?>                
            </div>
       </div>
       <?php
       if(strlen($PracticalTips->msg)>10 || strlen($QuickFacts->msg)>10)
       {
       ?>
        <div class="boxcl1">
       <?
       }
       ?>
           <?php
           if(!empty($where->title))
           {
           ?>
           <div class="boxl">
               <div class="titlemsg"><?php echo $where->title?></div>
               <div class="intromsg">
                    <?php echo $where->msg?>  
                    <?php echo buildreadmore($where->readmore)?>
               </div>               
           </div>
           <?php
           }
           ?>
           
            <?php
           if(!empty($when->title))
           {
           ?>
           <div class="boxl">
               <div class="titlemsg"><?php echo $when->title?></div>
               <div class="intromsg">
                    <?php echo $when->msg?>
                    <?php echo buildreadmore($when->readmore)?>
               </div>               
           </div>
           <?php
           }
           ?>  
           
           <?php
           if(strlen(strip_tags($Highlights->msg))>10)
           {
            ?>
           <div class="boxl">
               <div class="titlemsg"><?php echo __('Highlights')?></div>
               <div class="intromsg">
                    <?php echo $Highlights->msg?>
                    <?php echo buildreadmore($Highlights->readmore)?>
               </div>               
           </div>   
           <?php
           }
           ?> 
           
           <?php
           if(strlen(strip_tags($Visa->msg))>10)
           {
            ?>
           <div class="boxl">
               <div class="titlemsg"><?php echo $Visa->title?></div>
               <div class="intromsg">
                    <?php echo $Visa->msg?>
                    <?php echo linkreadmore('Visa')?>
               </div>               
           </div>   
           <?php
           }
           ?> 
           
            <?php
           if(strlen(strip_tags($TravelTips->msg))>10)
           {
            ?>
           <div class="boxl">
               <div class="titlemsg"><?php echo $TravelTips->title?></div>
               <div class="intromsg">
                    <?php echo $TravelTips->msg?>
                    <?php echo linkreadmore('TravelTips')?>                                        
               </div>               
           </div>   
           <?php
           }
           ?> 
           
           <?php
           if(strlen(strip_tags($FAQs->msg))>10)
           {
            ?>
           <div class="boxl">
               <div class="titlemsg"><?php echo $FAQs->title?></div>
               <div class="intromsg">
                    <?php echo $FAQs->msg?>
                    <?php echo linkreadmore('FAQs')?>
               </div>               
           </div>   
           <?php
           }
           ?> 
           
       <?php
       if(strlen($PracticalTips->msg)>10 || strlen($QuickFacts->msg)>10)
       {
       ?>
        </div> 
       <div class="boxcl2"> 
       <?
       }
       ?>   
            <?php             
            if(strlen($PracticalTips->msg)>10)
            {
            ?>
                <div class="titlemsg"><?php echo $PracticalTips->title?></div>          
                <div><?php echo $PracticalTips->msg?></div>
                <?php echo buildreadmore($PracticalTips->readmore)?>
            <?php
            }
            ?>
            
            <?php             
            if(strlen($QuickFacts->msg)>10)
            {
            ?>
                <div class="titlemsg upk"><?php echo __("Quick Facts")?></div>          
                <div><?php echo $QuickFacts->msg?></div>
                <?php echo buildreadmore($QuickFacts->readmore)?>
            <?php
            }
            ?>
       <?php
       if(strlen($PracticalTips->msg)>10 || strlen($QuickFacts->msg)>10)
       {
       ?>
        </div> 
       <?
       }
       ?>  
       
       <div class="clear"></div>
       
       <div class="boxvideo">
            <div class="tabs" id="videotab">
                <a><?php echo __("Related Experiences")?></a>
                <a><?php echo __("Videos")?></a>
            </div>
            <div class="pages" id="videotab_pages">
                <div class="page">
                 <?php 
                foreach($otherdestinations as $i=>$oloc)
                {
                    $Link   = '/'.$html->urlRoot.getLinkLocParent($oloc['iParentId']).'/'.$oloc['cUrlString'];
                    if(empty($oloc['cImage']))
                    {
                        $oloc['cImage']= getPhotoLocation($oloc['iId']);
                    }
                ?>
                <a class="Related" href="<?echo $Link?>" >
                    <span class="img">
                        <img height="150" src="<?php echo GetIntroImg($oloc['cImage'],true)?>" alt="<?php echo $oloc['cName']?>" />
                    </span>
                    <span class="tt"><?php echo $oloc['cName']?></span>
                    <span class="l"></span>
                    <span class="fmo"><?php echo __("Find out more")?></span>
                </a>
                <?
                }
                ?>
                </div>
                <div class="page">
                <?php 
                foreach($videos as $i=>$video)
                {
                ?>
                <a class="video" onclick="playvideo('<?php echo $video['iId']?>')">
                    <span class="img">
                        <img height="150" src="<?php echo GetIntroImg($video['cImage'],true)?>" alt="<?php echo $video['cName']?>" />
                    </span>
                    <span class="tt"><?php echo $video['cName']?></span>
                    <span class="fmo"><?php echo __("Play video")?></span>
                </a>
                <div style="display: none;" id="video_<?php echo $video['iId']?>">
                    <div class="videoshow" id="vc_<?php echo $video['iId']?>">
                        <div class="tt"><?php echo $video['cName']?></div>                    
                        <?php echo $video['cCode']?>
                    </div>
                </div>
                <?
                }
                ?>
                </div>
                <div class="clear"></div> 
            </div>            
       </div>
       <script type="text/javascript">(new TrTabs).init('videotab')</script>          
    </div>  
      
    <div class="col2">
        <div class="Thumbs">
            <div class="tt"><?php echo __("Browse Gallery")?></div>
            <div id="ppage"></div>
            <div class="PrevnAct" id="Prev" onclick="TrGallery.goFrame(-1)"></div>
            <div id="ThumbsDiv"></div>
            <div class="NextnAct" id="Next" onclick="TrGallery.goFrame(1)"></div>
            <div id="GDescription"></div>
        </div>
        <script type="text/javascript">    
        <?php
        foreach($photos as $i=>$photo)
        {
        ?>
        TrGallery.addImg({f:"<?php echo GetIntroImg($photo['cImage'],true)?>",t:"<?php echo $photo['cName']?>"});
        <?php
        }
        ?>
        TrGallery.init({dt:'ThumbsDiv',imginf:4,rowt:2});
        </script>
        
        <div style="padding-top: 20px;"></div>                
        <?php include 'templates/box/tabpackages.tpl'?>
        <div style="padding-top: 20px;"></div>
         <?php include("templates/box/tabhotel.tpl")?>
        <div class="dots"></div>
        <?php include("templates/box/subscribe.tpl")?>
    </div>
    <div style="clear: both;">&nbsp;</div>      
<?php
}
?>

</div>